﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageAdmin.master" AutoEventWireup="true"
    CodeFile="dsykien.aspx.cs" Inherits="Admin_dsykien" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="mainy">
        <div class="row">
            <div class="col-md-12">
                <div class="awidget">
                    <div class="awidget-head">
                        <h3>
                            Danh sách ý kiến</h3>
                    </div>
                    <div class="awidget-body">
                        <asp:Panel ID="Pa_hide" runat="server" Visible="false">
                            <div class="form-group">
                                <label class="col-lg-2 control-label">
                                    Mã sinh viên</label>
                                <div class="col-lg-102">
                                    <asp:Label ID="lb_masv" style="width:50px" runat="server"></asp:Label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">
                                    Lý do</label>
                                <div class="col-lg-10" style="padding: 10px 0 10px 0">
                                    <asp:TextBox ID="txt_lydo" runat="server" class="form-control" TextMode="MultiLine"
                                        Rows="5" placeholder="Lý do"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-offset-2 col-lg-10" style="padding: 10px 0 10px 0">
                                <asp:Button ID="btn_ban" runat="server" class="btn btn-default" Text="Khóa" 
                                    onclick="btn_ban_Click" />
                            </div>
                        </asp:Panel>
                         <asp:Panel ID="pa_mail" runat="server" Visible="false">
                            <div class="form-group">
                                <label class="col-lg-2 control-label">
                                    Mã sinh viên</label>
                                <div class="col-lg-102">
                                    <asp:Label ID="lb_masv_mail" style="width:50px" runat="server"></asp:Label>
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-lg-2 control-label">
                                    Email</label>
                                <div class="col-lg-102">
                                    <asp:Label ID="lb_mail" style="width:50px" runat="server" Text="Email" ></asp:Label>
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-lg-2 control-label">
                                    Chủ đề</label>
                                <div class="col-lg-102">
                                    <asp:TextBox ID="txt_chude" style="width:350px" runat="server" class="form-control" placeholder="Chủ đề"></asp:TextBox>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">
                                    Nội dung</label>
                                <div class="col-lg-10" style="padding: 10px 0 10px 0">
                                    <asp:TextBox ID="txt_noidung_mail" runat="server" class="form-control" TextMode="MultiLine"
                                        Rows="5" placeholder="Nội dung"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-offset-2 col-lg-10" style="padding: 10px 0 10px 0">
                                <asp:Button ID="Button1" runat="server" class="btn btn-default" Text="Gửi" onclick="Button1_Click" 
                                  />
                            </div>
                        </asp:Panel>
                        <asp:GridView ID="gr_tin" runat="server" class="table table-hover table-bordered"
                            AutoGenerateColumns="false">
                            <Columns>
                                <asp:TemplateField HeaderText="STT" ItemStyle-Width="15%">
                                    <ItemTemplate>
                                        <%# Eval("RowNumber") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Chủ đề">
                                    <ItemTemplate>
                                        <a href='/admin/ykien.aspx?id=<%# Eval("ykienid") %>' class="trangthai<%# Eval("trangthai") %>">
                                            <%# Eval("chude") %></a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Mã sinh viên">
                                    <ItemTemplate>
                                        <%# Eval("masinhvien") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Tên lớp">
                                    <ItemTemplate>
                                        <%# Eval("tenLop")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Chức năng" HeaderStyle-Width="100" ItemStyle-CssClass="chucnang">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="btn_delete" runat="server" CommandName="del" CommandArgument='<%# Eval("ykienid") %>'
                                            class="btn btn-xs btn-danger" ToolTip="Xóa" OnClientClick="javascript:return confirm('Bạn có muốn xóa?');"><i class="icon-remove"></i></asp:LinkButton>
                                              <asp:LinkButton ID="btn_mail" runat="server" CommandName="mail" CommandArgument='<%# Eval("masinhvien") %>'
                                            class="btn btn-xs btn-danger" ToolTip="Trả lời"><i class=" icon-envelope"></i></asp:LinkButton>

                                        <asp:LinkButton ID="btn_ban" runat="server" CommandName="khoa" CommandArgument='<%# Eval("masinhvien") %>'
                                            class="btn btn-xs btn-danger" ToolTip="Ban nick"><i class=" icon-ban-circle"></i></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <ul class="pagination pull-right">
                            <asp:Repeater ID="rptPager" runat="server">
                                <ItemTemplate>
                                    <li>
                                        <asp:LinkButton ID="lnkPage" runat="server" Text='<%#Eval("Text") %>' CommandArgument='<%# Eval("Value") %>'
                                            Enabled='<%# Eval("Enabled") %>' OnClick="Page_Changed"></asp:LinkButton></li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
